﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace SelfMadeMillionaire.Web.Infrastructure.ViewModels.Promotion
{
    public class PromotionEditViewModel
    {
        public int ID { get; set; }

        [Required]
        [DisplayName("Promotion Name")]
        [StringLength(100)]
        public string Name { get; set; }

        [Required]
        [DisplayName("Discount")]
        [Range(0, int.MaxValue, ErrorMessage = "Please enter valid integer Number")]
        public int Discount { get; set; }

        [Required]
        [DisplayName("Discount Unit:")]
        public bool IsPercent { get; set; }

        [Required]
        [DisplayName("Promotion Code")]
        [StringLength(100)]
        public string PromoCode { get; set; }

        [DisplayName("Effective Date:")]
        public DateTime EffectiveDate { get; set; }

        [DisplayName("Expiration Date:")]
        public DateTime ExpirationDate { get; set; }

        public int Product { get; set; }

        //public SelectList ProductList { get; set; }
        public IEnumerable<SelectListItem> ProductList { get; set; }
        public byte Status { get; set; }
    }
}
